//统一配置
let baseURL = 'http://www.itcbc.com:8080'
$.ajaxPrefilter(function(option) {
    //修改跟url
    option.url = baseURL + option.url
        //统一携带请求头
    option.headers = {

        Authorization: localStorage.getItem('token')

    }
    option.complete = function(xhr) {
        // console.log(xhr);
        let res = xhr.responseJSON;
        if (res && res.status === 1 && res.message === '身份认证失败') {
            localStorage.removeItem('token')
            location.href = './login.js'
        }
    }
})